import request from '@/utils/request'
export default {
    getList(query, size = 1, current = 20) {
        return request({
            url: `/article/article/search`,
            method: "post",
            data: {
                ...query,
                current,
                size
            }
        })
    },
    // 查询文章详情
    getById(id) {
        return request({
            url: `/article/article/${id}`,
            method: 'get'
        })
    },
    getCategoryAndLabel() {
        return request({
            url: `/article/category/label/list`,
            method: 'get'
        })
    },
    // 审核成功
    auditSuccess(id) {
        return request({
            url: `/article/article/audit/success/${id}`,
            method: 'get'
        })
    },
    //审核失败
    auditFail(id) {
        return request({
            url: `/article/article/audit/fail/${id}`,
            method: 'get'

        })
    },
    // 删除
    deleteById(id) {
        return request({
            url: `/article/article/${id}`,
            method: 'delete'
        })
    }
}